<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	template="/WEB-INF/layout/layout.xhtml">
	
	<ui:define name="title">Modifica Hoja de Control</ui:define>
	<ui:define name="content">
		<ice:form partialSubmit="true">
		
		    <style type="text/css">
                 .ui-datatable-odd {background-color:#F7F7F7 !important;} 
                  .ui-datatable { font-size:.95em } 
             </style>

			<ice:outputText style="padding-left:2px; font-size:11px;" value="Seleccione la operación que desea Modificar:" />

			<ace:dataTable width="100%" id="operationsTable" lazy="true"
				height="300" 
				rows="#{operationUpdateController.pageSize}" paginator="true" rowIndexVar="row"
				value="#{operationUpdateController.operations}" var="operations">
				<ace:column sortBy="#{operations.id}">
					<f:facet name="header">
						<ice:outputText value="Operación" />
					</f:facet>
					<ice:commandLink
						action="#{operationUpdateController.fetchOperation}"
						style="text-align:center;display:block;">
						<ice:outputLabel value="#{operations.id}">
							<f:convertNumber maxFractionDigits="0" integerOnly="true"
								maxIntegerDigits="8" pattern="00000000" />
						</ice:outputLabel>
						<f:setPropertyActionListener
							target="#{operationUpdateController.idToFetch}"
							value="#{operations.id}" />
					</ice:commandLink>
				</ace:column>
				<ace:column sortBy="#{operations.operationType.description}">
					<f:facet name="header">
						<ice:outputText value="Tipo de Operación" />
					</f:facet>
					<h:outputText value="#{operations.operationType.description}" />
				</ace:column>
				<ace:column sortBy="#{operations.client.name}">
					<f:facet name="header">
						<ice:outputText value="Nombre del Cliente" />
					</f:facet>
					<h:outputText value="#{operations.client.name}" />
				</ace:column>
				<ace:column style="text-align:center" sortBy="#{operations.date}">
					<f:facet name="header">
						<ice:outputText value="Fecha" />
					</f:facet>
					<h:outputText value="#{operations.date.time}">
						<f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss z" />
					</h:outputText>
				</ace:column>
			</ace:dataTable>
		</ice:form>
	</ui:define>
</ui:composition>